package edu.sjsu.cs.files;


import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

public class EchoFile
{
   public static void main(String[] args) throws FileNotFoundException
   {
      System.out.println("Please enter a filename: ");
      Scanner keyboard = new Scanner(System.in);
      String filename = keyboard.nextLine();
      
      FileReader fRead;
      fRead = new FileReader(filename);
      
      Scanner fScanner = new Scanner(fRead);
      
      while(fScanner.hasNextLine())
      {
         String line = fScanner.nextLine();
         System.out.println(line);
      }
   }
}
